home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / aclocal / lock.m4 < prev    next >
Encoding:
M4 Source File  |  2010-09-19  |  1.2 KB  |  38 lines

  1. # lock.m4 serial 10 (gettext-0.18)
  2. dnl Copyright (C) 2005-2010 Free Software Foundation, Inc.
  3. dnl This file is free software; the Free Software Foundation
  4. dnl gives unlimited permission to copy and/or distribute it,
  5. dnl with or without modifications, as long as this notice is preserved.
  6.  
  7. dnl From Bruno Haible.
  8.  
  9. AC_DEFUN([gl_LOCK],
  10. [
  11.   AC_REQUIRE([gl_THREADLIB])
  12.   if test "$gl_threads_api" = posix; then
  13.     # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
  14.     # pthread_rwlock_* functions.
  15.     AC_CHECK_TYPE([pthread_rwlock_t],
  16.       [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1],
  17.          [Define if the POSIX multithreading library has read/write locks.])],
  18.       [],
  19.       [#include <pthread.h>])
  20.     # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
  21.     AC_TRY_COMPILE([#include <pthread.h>],
  22.       [#if __FreeBSD__ == 4
  23. error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
  24. #else
  25. int x = (int)PTHREAD_MUTEX_RECURSIVE;
  26. return !x;
  27. #endif],
  28.       [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1],
  29.          [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
  30.   fi
  31.   gl_PREREQ_LOCK
  32. ])
  33.  
  34. # Prerequisites of lib/lock.c.
  35. AC_DEFUN([gl_PREREQ_LOCK], [
  36.   AC_REQUIRE([AC_C_INLINE])
  37. ])
  38.